import { request } from '@utils/http'
import { IhospitalListRes, IdictArr, Iparams } from './model/hospitalListTypes'
// 获取医院列表数据
export function reqGetHospitalList(
  page: number,
  limit: number,
  params?: Iparams
) {
  return request.get<any, IhospitalListRes>(
    `/admin/hosp/hospital/${page}/${limit}`,
    {
      params,
    }
  )
}

// 获取省级数据
export function reqGetProvince(dictCode: string = 'province') {
  return request.get<any, IdictArr>(
    `/admin/cmn/dict/findByDictCode/${dictCode}`
  )
}
// 获取市或区级数据
export function reqGetCityOrDistrict(parentId: string) {
  return request.get<any, IdictArr>(
    `/admin/cmn/dict/findByParentId/${parentId}`
  )
}
